package com.spring.shops.model.result;

import com.spring.shops.model.entity.TzProdPropValue;
import com.spring.shops.model.vo.ProdPropVO;
import lombok.Data;

@Data
public class ProdPropResult {
    private String code=null;
    private String msg=null;
    private Object data;
    private String version="";
    private Integer timestamp=null;
    private String sign=null;
    private boolean success=true;
    private boolean fail=true;

    public static ProdPropResult page(ProdPropVO prodPropVO){

        ProdPropResult prodPropResult=new ProdPropResult();
        prodPropResult.setData(prodPropVO);
        prodPropResult.setFail(false);
        prodPropResult.setVersion("mall4j.v230424");
        prodPropResult.setCode("00000");
        return prodPropResult;
    }
    public static ProdPropResult Success() {
        ProdPropResult  result = new ProdPropResult ();
        result.setMsg("ok");
        result.setVersion("mall4j.v230424");
        result.setFail(false);
        result.setCode("00000");
        return result;
    }
    public static ProdPropResult  infoResult(TzProdPropValue tzProdPropValue) {
        ProdPropResult  result = new ProdPropResult ();
        result.setVersion("mall4j.v230424");
        result.setFail(false);
        result.setCode("00000");
        result.setData(tzProdPropValue);
        return  result;
    }

}
